package com.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.entity.Response;
import com.mapper.WrRoleMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Resource
    private WrRoleMapper wrRoleMapper;

    @GetMapping("/listRole")
    public Response listRole() {
        return new Response().setSuccess().appendMsg("list", wrRoleMapper.selectList(new QueryWrapper<>()));
    }
}
